<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Scramble Solver by Sam</title>
	<link rel="stylesheet" href="reset.css" type="text/css"/>
	<link rel="stylesheet" href="style.css" type="text/css"/>
	<script src="jquery.js" type="text/javascript"></script>
	<script src="ui_input.js" type="text/javascript"></script>
</head>
<body>
	<div id="header_wrapper" class="centered_component">
		<h1>Scramble Solver</h1>
	</div>
	<div id="gameboard_wrapper" class="centered_component">
		<table id="letter_table">
			<tr>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="0" onfocus="setCurrentInput(0)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="1" onfocus="setCurrentInput(1)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="2" onfocus="setCurrentInput(2)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="3" onfocus="setCurrentInput(3)"/>
				</td>
			</tr>
			<tr>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="4" onfocus="setCurrentInput(4)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="5" onfocus="setCurrentInput(5)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="6" onfocus="setCurrentInput(6)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="7" onfocus="setCurrentInput(7)"/>
				</td>
			</tr>
			<tr>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="8" onfocus="setCurrentInput(8)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="9" onfocus="setCurrentInput(9)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="10" onfocus="setCurrentInput(10)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="11" onfocus="setCurrentInput(11)"/>
				</td>
			</tr>
			<tr>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="12" onfocus="setCurrentInput(12)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="13" onfocus="setCurrentInput(13)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="14" onfocus="setCurrentInput(14)"/>
				</td>
				<td>
					<input type="text" size="1" maxlength="0" autocomplete="off" autocorrect="off" autocapitalize="off" id="15" onfocus="setCurrentInput(15)"/>
				</td>
			</tr>
		</table>
		<div id="button_wrapper>" class="centered_component">
			<input id="submit" type="submit" value="" onclick="submit()"/>
		</div>
		<form id="checkbox_wrapper" action="">
			<input type="checkbox" checked="checked" id="autotab"><p id="autotab_text">Automatically tab after typing a letter</p></input>
		</form>
	</div>
	<div id="results_wrapper" class="centered_component">
		<table id="results">
		</table>
	</div>
	<div id="footer" class="centered_component">
		<p class="bold">About:</p>
		<br>
		<p>In Zynga's <a href="http://itunes.apple.com/us/app/scramble-with-friends-free/id485084223?mt=8">Scramble with Friends</a>, players are given two minutes to find as many words as possible by stringing together adjacent letters from a 4x4 grid. As an avid fan of the game, I thought it would be interesting to figure out an efficient way to algorithmically find all possible words for a given board. The result is this solver!</p>
		<br>
		<p class="bold">To use:</p>
		<br>
		<ul id="steps">
			<li class="stepsli">1. Enter the letters by clicking on the squares above and typing.</li>
			<li class="stepsli">2. Add any letter or word multipliers by clicking on the appropriate square and hitting SPACE. Hitting SPACE will cycle through the multipliers in the following order:</li>
			<ul>
				<li>a. Double Letter</li>
				<li>b. Double Word</li>
				<li>c. Triple Letter</li>
				<li>d. Triple Word</li>
				<li>e. None</li>
			</ul>
			<li class="stepsli">3. Hit ENTER or push the Solve button to solve!.</li>
			<li class="stepsli">4. Click on entries in the results table to see detailed information!</li>
		</ul>
		<p id="credit" class="bold">Created by Sam Swarr in 2012</p>
	</div>
</body>
</html>